from django.views.decorators.http import require_GET

from itpay.server_agency.decorators import require_login
from itpay.utils import qiniu_utils


@require_login(check_white_ip=True)
@require_GET
def get_upload_token(request):
    token = qiniu_utils.get_upload_token()
    return dict(token=token)
